/*自定义CheckBox*/
import 'package:flutter/cupertino.dart';

class RoundCheckBox extends StatefulWidget {
  var value = false;

  @override
  State<StatefulWidget> createState() => RoundCheckBoxState();

  RoundCheckBox(this.value);
}

class RoundCheckBoxState extends State<RoundCheckBox> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: GestureDetector(
        onTap: () {
          setState(() {
            widget.value = !widget.value;
          });
        },
        child: Padding(
            padding: EdgeInsets.fromLTRB(0, 0, 5, 0),
            child: widget.value
                ? Image.asset(
                    'image/cb_select.png',
                    width: 16,
                    height: 16,
                  )
                : Image.asset(
                    'image/cb_default.png',
                    width: 16,
                    height: 16,
                  )),
      ),
    );
  }
}
